# FROM
FROM openjdk:11.0.16-jre-slim

# TZ
ENV TZ Asia/Shanghai

# 建立挂载文件夹
RUN mkdir -p /scheduler/data/

# WORKDIR
WORKDIR /app
# EXPOSE
EXPOSE 8080

# ADD jar
ADD ./target/*.jar app.jar

# ADD SDK 添加一些其他项目
#ADD ./docs/sdk docs/sdk
#ADD ./hc_lib/lib hc_lib/lib

# ADD templates
#ADD ./docs/templates docs/templates
#ADD ./docs/xrebel.jar xrebel.jar
# -XX:+PrintGCDetails \
ENV JAVA_OPTS="\
              -server \
              -Xmx800m \
              -Xms800m \
              -Xmn200m \
              -XX:MaxMetaspaceSize=150m \
              -XX:MetaspaceSize=150m \
              -XX:+UseG1GC \
              -XX:+PrintGCDetails \
              -XX:+HeapDumpOnOutOfMemoryError \
              -XX:HeapDumpPath=/heapdump.hprof"

# ENTRYPOINT
ENTRYPOINT java ${JAVA_OPTS}  -jar app.jar
